* Change to working directory *
use "boosters_ssm_replication_data.dta", clear

* Table 2: OLS regressions to generate AMCEs, with and without controls *
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive i.lesslethal if fully_vax_unboosted == 1, cluster(rid)
outreg2  using table2, word dec(3) label replace
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive lesslethal dem5 gop5 female age black latino education income work_from_home remote_capable inperson_essential  if fully_vax_unboosted == 1, cluster(rid)
outreg2  using table2, word dec(3) label append

* Figure 1 *
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive i.lesslethal if fully_vax_unboosted == 1, cluster(rid)
margins efficacy duration protection manufacturer  incentive, post
coefplot, drop(_cons) omitted baselevels xline(0) ///
headings(1.efficacy = "{bf:Efficacy}" ///  
1.duration = "{bf:Protection duration}" ///            
1.protection = "{bf:Protection against future variants}" ///
1.manufacturer = "{bf:Manufacturer}" ///
1.incentive = "{bf:Incentive}" , labsize(vsmall)) graphregion(color(white)) ylab(, labs(vsmall)) ///
xti(" " "Marginal Mean (Probability receiving hypothetical booster)", size(vsmall)) ciopts(lcolor(black)) level(95) mlcolor(black) msize(vsmall) lcolor(black) mcolor(black) xlabel(.45 .5 .55 .6 .65 .7 .75 .8, labsize(vsmall))  saving(fig1.gph, replace)
* Save as pdf for tex *
graph export fig1.pdf, replace

* Supplemental Information Analyses *

* Table S3: Marginal Means used to create Figure 1 *
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive i.lesslethal if fully_vax_unboosted == 1, cluster(rid)
margins efficacy duration protection manufacturer  incentive, post

* Table S4: Separatem Regressions by Omicron Contextual Prime *
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive if fully_vax_unboosted == 1 & lesslethal == 1 , cluster(rid)
outreg2  using tables4, word dec(3) label replace
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive if fully_vax_unboosted == 1 & lesslethal == 2, cluster(rid)
outreg2  using tables4, word dec(3) label append

* Table S5: Unvaccinated Respondents *
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive lesslethal if unvaccinated == 1, cluster(rid)
outreg2  using tables5, word dec(3) label replace
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive lesslethal dem5 gop5 female age black latino education income work_from_home remote_capable inperson_essential  if unvaccinated == 1, cluster(rid)
outreg2  using tables5, word dec(3) label append

* Table S6 f-tests below *

* SI Table 7 -- using the likert scale *
reg vax_likely i.efficacy i.duration i.protection i.manufacturer i.incentive i.lesslethal if fully_vax_unboosted == 1, cluster(rid)
outreg2  using sitable7, word dec(3) label replace
reg vax_likely i.efficacy i.duration i.protection i.manufacturer i.incentive lesslethal dem5 gop5 female age black latino education income work_from_home remote_capable inperson_essential  if fully_vax_unboosted == 1, cluster(rid)
outreg2  using sitable7, word dec(3) label append

* SI Table 8 -- all; drop bottom 5%; drop bottom 10% *
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive i.lesslethal if fully_vax_unboosted == 1, cluster(rid)
outreg2  using sitable8, word dec(3) label replace
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive i.lesslethal if fully_vax_unboosted == 1 & Duration__in_seconds_ > 237, cluster(rid)
outreg2  using sitable8, word dec(3) label append
reg receive i.efficacy i.duration i.protection i.manufacturer i.incentive i.lesslethal if fully_vax_unboosted == 1 & Duration__in_seconds_ > 280, cluster(rid)
outreg2  using sitable8, word dec(3) label append


* Demos for Table 1 *
* Each respondent received 5 vaccine profiles, so for demographics delete repeat observations 8
duplicates drop rid, force
* Attribute data is missing for three people *
drop if efficacy == .
* Generate age categories *
replace age = age*10
gen age1829 = 0
replace age1829 = 1 if age < 30
gen age3044 = 0
replace age3044 = 1 if age >29 & age < 45
gen age4559 = 0
replace age4559 = 1 if age > 44 & age < 60
gen age60plus = 0
replace age60plus = 1 if age > 59

* Full sample *
tab gender
tab age1829 
tab age3044 
tab age4559 
tab age60plus
tab education
tab black
tab latino
tab income
tab dem5
tab gop5
tab work_exposure

* Vaccinated, unboosted *
tab gender if fully_vax_unboosted==1
tab age1829 if fully_vax_unboosted==1
tab age3044 if fully_vax_unboosted==1
tab age4559 if fully_vax_unboosted==1
tab age60plus if fully_vax_unboosted==1
tab education if fully_vax_unboosted==1
tab black if fully_vax_unboosted==1
tab latino if fully_vax_unboosted==1
tab income if fully_vax_unboosted==1
tab dem5 if fully_vax_unboosted==1
tab gop5 if fully_vax_unboosted==1
tab work_exposure if fully_vax_unboosted==1

* Unvaccinated *
tab gender if unvaccinated==1
tab age1829 if unvaccinated==1
tab age3044 if unvaccinated==1
tab age4559 if unvaccinated==1
tab age60plus if unvaccinated==1
tab education if unvaccinated==1
tab black if unvaccinated==1
tab latino if unvaccinated==1
tab income if unvaccinated==1
tab dem5 if unvaccinated==1
tab gop5 if unvaccinated==1
tab work_exposure if unvaccinated==1

* Demos for Table S1 *
sum black latino female
tab education
sum age, detail
sum gop3 dem3
tab ideology

* Randomization checks for Table S6 *
format age education income %9.0g 
oneway dem5 efficacy if fully_vax_unboosted==1, tab
oneway gop5 efficacy if fully_vax_unboosted==1, tab
oneway female efficacy if fully_vax_unboosted==1, tab
oneway age efficacy if fully_vax_unboosted==1, tab
oneway black efficacy if fully_vax_unboosted==1, tab
oneway latino efficacy if fully_vax_unboosted==1, tab
oneway education efficacy if fully_vax_unboosted==1, tab
oneway income efficacy if fully_vax_unboosted==1, tab
oneway work_from_home efficacy if fully_vax_unboosted==1, tab
oneway remote_capable efficacy if fully_vax_unboosted==1, tab
oneway inperson_essential efficacy if fully_vax_unboosted==1, tab

oneway dem5 duration if fully_vax_unboosted==1, tab
oneway gop5 duration if fully_vax_unboosted==1, tab
oneway female duration if fully_vax_unboosted==1, tab
oneway age duration if fully_vax_unboosted==1, tab
oneway black duration if fully_vax_unboosted==1, tab
oneway latino duration if fully_vax_unboosted==1, tab
oneway education duration if fully_vax_unboosted==1, tab
oneway income duration if fully_vax_unboosted==1, tab
oneway work_from_home duration if fully_vax_unboosted==1, tab
oneway remote_capable duration if fully_vax_unboosted==1, tab
oneway inperson_essential duration if fully_vax_unboosted==1, tab

oneway dem5 protection if fully_vax_unboosted==1, tab
oneway gop5 protection if fully_vax_unboosted==1, tab
oneway female protection if fully_vax_unboosted==1, tab
oneway age protection if fully_vax_unboosted==1, tab
oneway black protection if fully_vax_unboosted==1, tab
oneway latino protection if fully_vax_unboosted==1, tab
oneway education protection if fully_vax_unboosted==1, tab
oneway income protection if fully_vax_unboosted==1, tab
oneway work_from_home protection if fully_vax_unboosted==1, tab
oneway remote_capable protection if fully_vax_unboosted==1, tab
oneway inperson_essential protection if fully_vax_unboosted==1, tab

oneway dem5 manufacturer if fully_vax_unboosted==1, tab
oneway gop5 manufacturer if fully_vax_unboosted==1, tab
oneway female manufacturer if fully_vax_unboosted==1, tab
oneway age manufacturer if fully_vax_unboosted==1, tab
oneway black manufacturer if fully_vax_unboosted==1, tab
oneway latino manufacturer if fully_vax_unboosted==1, tab
oneway education manufacturer if fully_vax_unboosted==1, tab
oneway income manufacturer if fully_vax_unboosted==1, tab
oneway work_from_home manufacturer if fully_vax_unboosted==1, tab
oneway remote_capable manufacturer if fully_vax_unboosted==1, tab
oneway inperson_essential manufacturer if fully_vax_unboosted==1, tab

oneway dem5 incentive if fully_vax_unboosted==1, tab
oneway gop5 incentive if fully_vax_unboosted==1, tab
oneway female incentive if fully_vax_unboosted==1, tab
oneway age incentive if fully_vax_unboosted==1, tab
oneway black incentive if fully_vax_unboosted==1, tab
oneway latino incentive if fully_vax_unboosted==1, tab
oneway education incentive if fully_vax_unboosted==1, tab
oneway income incentive if fully_vax_unboosted==1, tab
oneway work_from_home incentive if fully_vax_unboosted==1, tab
oneway remote_capable incentive if fully_vax_unboosted==1, tab
oneway inperson_essential incentive if fully_vax_unboosted==1, tab

oneway dem5 lesslethal if fully_vax_unboosted==1, tab
oneway gop5 lesslethal if fully_vax_unboosted==1, tab
oneway female lesslethal if fully_vax_unboosted==1, tab
oneway age lesslethal if fully_vax_unboosted==1, tab
oneway black lesslethal if fully_vax_unboosted==1, tab
oneway latino lesslethal if fully_vax_unboosted==1, tab
oneway education lesslethal if fully_vax_unboosted==1, tab
oneway income lesslethal if fully_vax_unboosted==1, tab
oneway work_from_home lesslethal if fully_vax_unboosted==1, tab
oneway remote_capable lesslethal if fully_vax_unboosted==1, tab
oneway inperson_essential lesslethal if fully_vax_unboosted==1, tab

